package com.rabbit.vo;

import com.rabbit.constant.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <h1>分页通用返回</h1>
 *
 * @author zjw
 * @date 2020/08/03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class PageResultVO<T> extends ResultVO<T> {

    /**
     * 总数
     */
    private Long count;

    public PageResultVO(ResultCodeEnum resultCodeEnum, T data, Long count) {
        super(resultCodeEnum.getCode(), resultCodeEnum.getMessage(), data);
        this.count = count;
    }

}
